The present invention relates to a program starting system by which an executable program is relocated in the memory of a computer system so that another executable program may be located at the fixed address.
FIG. 14 shows a commonly used, conventional program starting system which includes a file storage unit 1 for storing programs as files. A memory map 2 displays an operating system (OS) 3 and an executable program 4 which is operable in the operating system 3. The executable program 4 consists of a program body 7, a program header 6 prepared at the time of linking for storing relocation information and an execution starting address of the program body 7, and a header 5a, which is appended by the operating system 3 when the executable program is loaded in the memory, to contain the execution environment information to be transferred to the executable program or a parameter character string input by the user.
A commonly used program developing procedure is shown in the steps S6 through S10 of a flowchart in FIG. 13.
FIG. 4 shows a commonly used, conventional computer system which includes a file storage unit 1 for storing executable programs, a file controller 1a for transmitting data between the file storage unit 1 and a system bus 30, a central processing unit (CPU) 24 for using the system bus 30 to perform predetermined operation and control, a memory unit 25 for storing program files from the file controller 1a, a display unit 26 for displaying the results executed by the system or input by the user, a display controller 26a for controlling the display unit 26 and feeding the data to be displayed to the display unit 26, a keyboard 27 for the user to key in system control data, a keyboard controller 27a for transmitting data from the keyboard 27 to the system bus 30, a printer 28 for outputting the executed results, a printer controller 28a for feeding data to the printer 28, an input/output device 29 for other inputs and outputs, and a input/output controller 29a for controlling the input/output device 29.
The operation of the conventional program starting system will be described with reference to FIG. 13. The step S6 is entry to a program preparation procedure. In the step S7, a source program is prepared. In the step S8, the source program is assembled into an object program. In the step S9, the program is linked. In the step S10, an executable program is completed. Alternatively, the executable program of the step S10 may be an off-the-shelf program 20a in the step S11.
This executable program is stored as a file in the file storage unit 1 of FIG. 14. In response to the user's instruction, the operating system 3 appends a header 5a to the program 4 and stores it in a program area of the memory map 2. Then, the operating system 3 sets relocation information of the program header 6 in the program body 7. Control of the execution is then transferred from the operating system 3 to the execution starting address of the program, thereby starting the program body 7.
In the above program starting system, however, has some problems. For example, when another program is located at the fixed address which is not an empty memory area, the existing program at the address is destroyed, thus presenting a hang-up problem with which the computer stops in an unexpected process step.